package Day06;
//数组的演示
import java.util.Arrays;
public class ArraysDemo {
    public static void main(String[] args) {














        int[] arr = new int[4];
        for (int i=0;i<arr.length;i++){
            arr[i] = (int)(Math.random()*100);
        }

        Arrays.sort(arr);       //对arr进行升序排列

        for (int i=0;i<arr.length;i++){
            System.out.println(arr[i]);
        }
        System.out.println("倒着输出");

        for (int i= arr.length-1;i>=0;i--){
            System.out.println(arr[i]);
        }

    }


}
